/**
 * Created by x on 17-7-27.
 */
angular.module('rentAgreement', []).component(
    'rentAgreement',
    {
        templateUrl: 'component/base/rent_agreement/rent_agreement.template.html',
        controller: ['$scope','$rootScope','$location','Api','Alert','$state',
            function ($scope,$rootScope,$location,Api,Alert,$state) {
                var statePath = $location.$$url;
                $scope.apartmentId = statePath.split("/")[statePath.split("/").length - 1];
                $scope.gotoAddRentagreemen = gotoAddRentagreement;
                function gotoAddRentagreement() {
                    $state.go('company.companyaddRentagreement',{apartmentId:$scope.apartmentId});
                }

            }]
    }
)

